home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 19
/
CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso
/
CUCD
/
Programming
/
LEDA
/
prog
/
dict
/
d_array.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-05
|
399b
|
28 lines
#include <LEDA/d_array.h>
void print(d_array<string,string>& A)
{ string s;
forall_defined(s,A) cout << s << " " << A[s] << "\n";
}
main()
{
d_array<string,string> trans, D;
trans["hello"] = "hallo";
trans["world"] = "Welt";
trans["book"] = "Buch";
trans["coffee"] = "Kaffee";
trans["hello"] = "xyz";
D = trans; // makes a copy
print(D);
newline;
return 0;
}